[Programming Problem] Deepest Leaves Sum

Given a binary tree, return the sum of values of its deepest leaves. Example 1: Input: root = [1,2,3,4,5,null,6,7,null,null,null,null,8] Output: 15 [Problem Link] Algorithm Traverse through the tree using a level variable (which tells you which level you’re at). When you reach a leaf, maintain a key map of level->sum. In the end, pick the … Continue reading [Programming Problem] Deepest Leaves Sum